import { createRouter, createWebHistory } from 'vue-router'
import login from '../views/login/login.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },
    {
      path: "/login",
      name: "Login",
      // component: Login,
      component: () => import('../views/login/login.vue')
    },
    {
      path: '/userinfo',
      name: 'userinfo',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/User/userinfo.vue')
    },
    {
      path: '/qa',
      name: 'qa',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/question-record/qa.vue')
    },
    {
      path: '/feedback',
      name: 'feedback',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/feedback/feedback.vue')
    }, 
    {
      path: '/show',
      name: 'show',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/User/show.vue')
    },
    {
      path: '/instruction',
      name: 'instruction',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/User/instruction.vue')
    },
    {
      path: '/fbshow',
      name: 'fbshow',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/feedback/fbshow.vue')
    },
    {
      path: '/time',
      name: 'time',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/time2/index.vue')
    }
  ]

})

export default router
